Much data is organized in a “hierarchical” format—that is, a format that permits the specification of a hierarchy of structures and sub-structures. For example, extensible Markup Language (XML) is a popular format for representing data, and XML supports a hierarchical format in the sense that data may be “bracketed” with tags, and tags may be nested within other tags.
While it is common to organize information hierarchically, the most common means of storage is a database which stores data in relational tables. Relational tables are not hierarchical; they are “flat.” Relational databases store rows of columnar data; the rows may be placed in an order, but a relation has no inherent hierarchical structure. It would be advantageous to represent hierarchically-organized data (such as an XML document) in a “flat” data structure (such as a relation), such that hierarchical structure of the data can be captured and preserved in the flat data structure.
In view of the foregoing, there is a need for a system and method for representing hierarchical data that overcomes the drawbacks of the prior art.